#ifndef _MAINWIN_HPP
#define _MAINWIN_HPP

#include "main.hpp"
#include "configwin.hpp"

using namespace Gtk;
using namespace Glib;
using namespace sigc;
using namespace std;
using namespace Gnome;

class MainWin{
      private:
              RefPtr<Glade::Xml> refXml;
              Window *mainwin;
              MenuItem* mnuQuit;
              MenuItem* mnuRefresh;
              MenuItem* mnuSave;
              MenuItem* mnuPrefs;
              MenuItem* mnuAbout;
              ToolButton *tbtnRefresh;
              ToolButton *tbtnSaveAs;
              ToolButton* tbtnPrefs;
              TreeView *trvSites;
              Button* btnAddSite;
              Button* btnRemoveSite;
              Entry *entName;
              Entry *entUrl;
              Entry *entUser;
              Button *btnEditPass;
              Button *btnCopyPass;
              TextView *txtNotes;
              Button *btnSave;
              Button *btnRevert;
              void Init();
              
              void PopSites();
              void tbtnRefresh_Click();
              void tbtnSaveAs_Click();
              void tbtnPrefs_Click();
              void trvSites_Row_Activate(const TreeModel::Path& path, TreeViewColumn* column);
              void btnEditPass_Click();
              void btnCopyPass_Click();
              void btnSave_Click();
              void btnRevert_Click();
              void mnuQuit_Click();
              void mnuAbout_Click();
              
              void aboutdialog_Dismiss(int q);
      public:
             MainWin();
             void Run();
};

#endif
